﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TextMining.Models;

namespace TextMining
{
    public partial class CollectionWords : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            MyDoc myDoc = new MyDoc();
            CategoryList cateList = new CategoryList();
            cateList.InitialCateList();
            if (cateList.CateList.Count > 0)
            {
                string sHtmlheader = string.Empty;
                string sHtmlBody = string.Empty;
                foreach (var cate in cateList.CateList)
                {
                    sHtmlheader = "<td>" + cate.Key + "</td>";
                    litTable.Text += sHtmlheader;
                    string sChar = string.Empty;
                    foreach (var item in cate.Value)
                    {
                        sChar += item + ", ";
                    }
                    sHtmlBody = "<td valign='top'>" + sChar + "</td>";
                    litBody.Text += sHtmlBody;

                }
            }

        }

       

    }
}